<?php
/**
 * Description
 *
 * PHP version 7
 *
 * @category Custom
 * @package  Custom
 * @author   ryu <mo5467@126.com>
 * @date     2020-04-29 00:41:17
 * @lastTime 2020-04-29 00:44:04
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     none
 */
namespace Test\Unit;

use Design\Behavioral\State\OrderContext;

class StateTest extends \Test\BaseTest
{


    public function testCanCreate()
    {
        $context = OrderContext::create();
        $this->assertSame('created', $context->toString());

        $context->proceedToNext();
        $this->assertSame('shipped', $context->toString());

        $context->proceedToNext();
        $this->assertSame('done', $context->toString());

        $context->proceedToNext();
        $this->assertSame('done', $context->toString());

    }//end testCanCreate()


}//end class
